package com.remainder.oss.ali.core;

import org.springframework.boot.context.properties.ConfigurationProperties;

import lombok.Data;

/**
 * 阿里Oss Sts配置类
 *
 * @author remainder
 * @date 2023/3/18 17:51
 **/
@Data
@ConfigurationProperties(prefix = "oss.sts")
public class OssStsProperties {

    /**
     * 是否启用标记
     */
    private Boolean enable;

    /**
     * STS Access key 详情见：https://ram.console.aliyun.com/users/detail
     */
    private String stsAccessKey = "LTAI5tEy8UV4B2vaK1z881EF";

    /**
     * STS Secret key 详情见：https://ram.console.aliyun.com/users/detail
     */
    private String stsSecretKey = "KwGFAwDUP2sGl95xLnNL9BuwIGmhQ4";

    /**
     * STS接入点 详情见：https://help.aliyun.com/document_detail/371859.html
     */
    private String stsEndpoint = "sts.cn-shenzhen.aliyuncs.com";

    /**
     * 角色 Arn 详情见：https://ram.console.aliyun.com/roles
     */
    private String roleArn = "acs:ram::1454987613324358:role/test";

    /**
     * 角色会话名称（自定义,用来区分不同的令牌） 详情见：https://help.aliyun.com/document_detail/371864.html
     */
    private String roleSessionName = "remainder";

    /**
     * Token有效期。单位：秒 详情见：https://help.aliyun.com/document_detail/371864.html
     */
    private long durationSeconds = 3600;

}
